<?php

namespace app\admin\controller;

use app\admin\model\OrderModel;
use think\Controller;
use think\Db;
use think\Request;

class OrderController extends Controller
{
    public function orderlist()
    {
        $data = model('OrderModel') ->showorderlist();
        return view('order/orderlist',[
            'data' => $data
        ]);
    }

    public function details($id)
    {
        $data = model('OrderModel') ->showdetails($id);
        return view('order/orderdetails',[
            'details' => $data
        ]);
    }

    public function contlist()
    {
        $data = model('OrderModel') ->showcontlist();
//        var_dump($data);die;

        return view('order/ordermar',[
            'data' => $data
        ]);
    }

    public function conrl($id)
    {
        $data = model('OrderModel') ->conrl($id);

        if($data > 0){
            return $this->success('已确认付款,订单已完成！');
        }else{
            return $this->error('6666');
        }
    }

}



















